package experiment.e05.code.ch04.v0;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/13 16:01
 * @package experiment.e05.code.ch04.v0
 * @description 文件说明
 */
public class Point {
    // 实例变量 : 位置坐标 x y
    private int x;
    private int y;

    // 构造方法
    public Point() {
    }

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    // get && set
    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    // toString:显示坐标信息
    @Override
    public String toString() {
        return "坐标=(" + "x=" + x + ", y=" + y + ')';
    }
}
